From 8f2427a69bc0388ddfb14a10eaf71e589f3b0913 Mon Sep 17 00:00:00 2001 From: N V <44036031+progfolio@users.noreply.github.com> Date: Wed, 1 Jul 2020 22:19:37 -0400 Subject: [PATCH] Fix which-key--propertize-description use make-text-button return value (#249) As of: https://github.com/emacs-mirror/emacs/commit/7ac79872aed63110c0d26c1e62e1838d6101c9bd make-text-button no longer modifies a string when it is passed as the first argument. which-key--propertize-description relied on the mutation of the string argument. Using the return value of make-text-button will return the propertized string with both the new and old behavior. Fixes #248 --- which-key.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index 8c88b44c177..475772f0e3c 100644 --- a/which-key.el +++ b/which-key.el @@ -1663,8 +1663,7 @@ ORIGINAL-DESCRIPTION is the description given by (max (floor (* (frame-width) 0.8)))) (if (> (length str) max) (concat (substring str 0 max) "...") - str)))))) - desc))) + str))))))))) (defun which-key--extract-key (key-str) "Pull the last key (or key range) out of KEY-STR." -- 2.30.2